addpath('../functions')
%% young
run("MatlabDataConstruction_young.m")
load '../data/DataforMatlab/UK_Budget_young.mat'
load '../data/DataforMatlab/pvec_tmp.mat'
load ../data/DataforMatlab/IP.csv
load ../data/DataforMatlab/torn.csv
B_vec = B_vec./sum(B_vec);
I = size(B_vec,1);N = size(B_vec,2);T = size(B_vec,3);
pvec = reshape(pvec_tmp',[I,1,T]);
[U_vec] = CalMoneyMetric(I_vec, B_vec, pvec,0);
run("sub_make_percentile.m")
EVdivisia_y = RC;
OurxaxisUK_y = OurxaxisUK;
OuryaxisUK_y = OuryaxisUK;
save('../data/DataforMatlab/Young_percentiles','EVdivisia_y','OurxaxisUK_y',"OuryaxisUK_y")
%% old 
run("MatlabDataConstruction_old.m")
load '../data/DataforMatlab/UK_Budget_old.mat'
load '../data/DataforMatlab/pvec_tmp.mat'
load ../data/DataforMatlab/IP.csv
load ../data/DataforMatlab/torn.csv

B_vec = B_vec./sum(B_vec);
I = size(B_vec,1);N = size(B_vec,2);T = size(B_vec,3);
pvec = reshape(pvec_tmp',[I,1,T]);
[U_vec] = CalMoneyMetric(I_vec, B_vec, pvec,0);
run("sub_make_percentile.m")
EVdivisia_o = RC;
OurxaxisUK_o = OurxaxisUK;
OuryaxisUK_o = OuryaxisUK;
save('../data/DataforMatlab/Old_percentiles','EVdivisia_o','OurxaxisUK_o',"OuryaxisUK_o")
%%
load ../data/DataforMatlab/Young_percentiles
load ../data/DataforMatlab/Old_percentiles

